package stuman.entity;

import java.io.Serializable;
import java.util.ArrayList;


public class Semester implements Serializable{
	

	private static final long serialVersionUID = 1L;
	
	private String name;
	private ArrayList<Subject> subjects = new ArrayList<Subject>();
	private Boolean current;
	
	public Semester(String n){
		this.name = n;
	}
	
	public String getName(){return name;}
	
	public Subject findSubject(Subject s){
		Subject sub;
		if (subjects.contains(s)){
			for (int i=0; i<subjects.size(); i++){
				if (subjects.get(i).equals(s)){
					sub = subjects.get(i);
				}
			}
		}
		else sub = null;
		return s;
	}
	
	public void setCurrent(Boolean b){
		current = b;
	}
	
	public Boolean isCurrent(){
		return current;
	}

}
